package com.example.myapplication.adapter;

import android.view.View;

import java.util.List;

public class PagerWithTitlesAdapter extends BasePagerAdapter{
    private String[] mTitles;

    public PagerWithTitlesAdapter(List<? extends View> data, String[] titles) {
        super(data);
        mTitles = titles;
    }

    public void resetPagerTitles(String[] titles){
        mTitles = titles;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles[position];
    }
}
